<!--
 * @Description: 新闻详情
 * @Author: zhanyinjia
 * @Date: 2022-09-27 14:50:57
 * @LastEditors: zhanyinjia
 * @LastEditTime: 2023-08-02 16:32:06
-->
<template>
  <div>
    <p class="back" @click="back">返回</p>
    <h4>新闻详情页</h4>
    <p>新闻id：{{ id }}</p>
  </div>
</template>

<script>
export default {
  name: 'Detail',
  data() {
    return {
      id: ''
    }
  },
  created() {
    this.id = this.$route.params.id || '未知'
  },
  methods: {
    back() {
      this.$router.go(-1)
    }
  }
}
</script>

<style lang="less" scoped>
.back {
  width: 60px;
  color: #999;
  border: 1px solid #999;
  padding: 6px 0;
  margin: 10px 0;
  text-align: center;
  border-radius: 4px;
}
</style>